#ifndef __FILE_H__
#define __FILE_H__

	#define FILE_SUCCESSFUL				0
	#define FILE_NON_EXISTENT			1
	#define FILE_ALREADY_EXISTENT		2
	#define FILE_NOSPACE_TOCREATE		3

	#define FILE_NOSPACE_TOWRITE		4
	#define FILE_CURSOR_OVERFLOW		5

	extern UINT8 SetCurrentFileByName(UINT8 FileName[], DIR *Value, UINT8 IsRam);
	extern UINT8 FileCreate(UINT8 FileName[], UINT32 Size);
	extern UINT8 FileDelete(UINT8 FileName[], UINT8 IsCompleted, UINT8 IsCheck);
	extern UINT8 FileDeleteAll(UINT8 IsCompleted);
	//extern UINT8 FileRename(UINT8 FileName[], UINT8 NewFileName[]);
	extern UINT8 FileOperate(UINT8 IsWrite ,UINT8 FileName[], UINT32 Start, UINT32 Length, void* pData);
	
	extern UINT32 CurrentFileEnumNums(UINT8 Attrib);
	extern UINT8 CurrentFileEnumNames(UINT32 StartIndex, UINT32 Nums, UINT8 Names[], UINT8 Attrib);

	extern UINT8 SramFileCreate(UINT8 FileName[], UINT32 Size);
	extern UINT8 SramFileDelete(UINT8 FileName[], UINT8 IsCompleted);
	extern UINT8 SramFileOperate(UINT8 IsWrite ,UINT8 FileName[], UINT32 Start, UINT32 Length, void* pData);

#endif
